package com.wxg.tuan.controller.admin;

import com.wxg.tuan.result.Result;
import com.wxg.tuan.service.EmployeeService;
import jakarta.annotation.Resource;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/merchant/employee")
public class EmployeeController {
        @Resource
        private EmployeeService employeeService;

    @GetMapping("/hello")
    public Result hello(){

        return Result.success("hello");
    }

    //发送邮箱验证码
    @GetMapping("/send-email/{email}")
    public Result sendEmail(@PathVariable("email") String email){

    return employeeService.sendEmail(email);
    }

    @PostMapping("{email}/{code}")
    public Result emailLogin(@PathVariable("email") String email,@PathVariable("code") String code)
    {
        return employeeService.emailLogin(email,code);
    }





}
